package com.qf.mapper;

import com.qf.pojo.Building;
import com.qf.vo.BuildingVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zdl
 * @date 2025/2/14
 */
public interface BuildingMapper {
    /**
     * 根据bid查询
     * @param bid
     * @return
     */
    Building selectBuildingByBid(int bid);

    /**
     * 查询全部
     * @return
     */
    List<Building> selectAllBuilding();

    /**
     * 添加
     * @param building
     * @return
     */
    int insertBuilding(Building building);

    /**
     * 根据buildingName  buildingLocation查询对应建筑
     * @param buildingName
     * @param buildingLocation
     * @return
     */
    Building selectBuildingByBuildingNameAndBuildingLocation(@Param("buildingName") String buildingName,@Param("buildingLocation") String buildingLocation);

    /**
     * 批量删除或单个删除
     * @param bids
     * @return
     */
    int delBuildingBatch(List<Integer> bids);

    /**
     * 判断楼层是否有房间
     * @param bid
     * @return
     */
    BuildingVo selectBuildingWithRoomByBid(int bid);
}
